home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib16.dsk
/
FAST FILE DEMO.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
1KB
|
30 lines
10 REM **********************
20 REM * FAST FILE DEMO *
30 REM * BY A.E. EVENSON *
40 REM * COPYRIGHT (C) 1983 *
50 REM * BY MICROSPARC, INC *
60 REM * LINCOLN, MA. 01773 *
70 REM **********************
80 HIMEM: 37632:D$ = CHR$(13) + CHR$(4)
90 PRINT D$;"BLOAD FILESEARCH,A$9300"
100 REM --CALLING THE ROUTINE
110 GOSUB 1000: END
999 REM --THE SUBROUTINE
1000 HOME : PRINT D$;"CLOSE"
1010 INPUT "FILE NAME: ";NA$: IF NA$ = "" THEN 1010
1020 INPUT "RECORD LENGTH: ";RL$: IF RL$ = "" THEN 1020
1030 INPUT "NUMBER OF FIELDS: ";NF
1040 INPUT "SEARCH FOR: ";SS$:SS = LEN(SS$): IF SS$ >12 THEN 1040
1045 IF SS$ = "" THEN 1040
1050 FOR D = 1 TO SS:X = 128 + ASC( MID$ (SS$,D,1)): POKE 37873 +D,X: NEXT : POKE 8,SS
1060 PRINT D$;"OPEN ";NA$;",L";RL$
1070 POKE 28, PEEK(46525): POKE 29, PEEK(46526)
1080 PRINT D$;"READ ";NA$;",R0": INPUT N
1090 NN = INT(N/256): POKE 30,N -NN *256: POKE 31,NN
1100 CALL 37632: REM --ENTER SEARCH
1110 IF PEEK(7) < >0 THEN PRINT "END OF SEARCH": RETURN
1120 RN = PEEK(25) + PEEK(26) *256: PRINT D$;"READ ";NA$;",R";RN: FOR D = 1 TO NF: INPUT DA$: PRINT DA$: NEXT
1130 PRINT D$: PRINT "CONTINUE OR END? (C/E): ";: GET G$: IF G$ = "E" THEN RETURN
1140 IF G$ < >"C" THEN 1130
1150 CALL 37658: REM --RE-ENTER SEARCH
1160 GOTO 1110